import request from '@/utils/request'

// http://192.168.139.11:8090//other-inbound/ncc

// 获取WMS其他入库单
export function getOtherInboundInfo(query) {
  return request({
    url: '/other-inbound',
    method: 'get',
    params: query
  });
}

// 获取NCC其他入库单
export function getOtherInboundNccInfo(query) {
  return request({
    url: '/other-inbound/ncc',
    method: 'get',
    params: query
  });
}

// 获取其他入库单签字
export function updateOtherInbound(cgeneralhid, data) {
  return request({
    url: `/other-inbound/${cgeneralhid}`,
    method: 'PUT',
    data
  });
}

// 获取其他入库单删除
// export function deleteOtherInbound(cgeneralhid) {
//   return request({
//     url: `/other-inbound/${cgeneralhid}`,
//     method: 'DELETE'
//   });
// }
export function deleteOtherInbound(cgeneralhid, query) {
  return request({
    url: `/other-inbound/${cgeneralhid}`,
    method: 'DELETE',
    params: query
  });
}

// 修改NCC其他入库单
export function createOtherInboundUpdate(data) {
  return request({
    url: '/other-inbound/update',
    method: 'post',
    data: JSON.stringify(data) // 将传入的数据转换为JSON字符串后作为请求体发送
  });
}

// 新增其他入库单据
export function createOtherInboundAddOtherOrder(data) {
  return request({
    url: '/other-inbound/add-other-order',
    method: 'post',
    data: JSON.stringify(data) // 将传入的数据转换为JSON字符串后作为请求体发送
  });
}

// WMS确认NCC其他入库单
export function createOtherInboundConfirm(data) {
  return request({
    url: '/other-inbound/confirm',
    method: 'post',
    data: JSON.stringify(data) // 将传入的数据转换为JSON字符串后作为请求体发送
  });
}

// 其他入库取消提取
export function createOtherInboundBack(headerid) {
  return request({
    url: `/other-inbound/back/${headerid}`,
    method: 'post',
  });
}

// 其他入库WMS下账
export function createOtherInboundInventory(headerid) {
  return request({
    url: `/other-inbound/inventory/${headerid}`,
    method: 'post',
  });
}















